@echo off
echo Testing login time update functionality...
echo.

REM 启动Spring Boot应用（如果还没启动的话）
echo Starting Spring Boot application...
start /B mvn spring-boot:run

REM 等待应用启动
timeout /t 15

REM 发送登录请求
echo Sending login request...
curl -X POST http://localhost:8080/auth/login ^
  -H "Content-Type: application/json" ^
  -d "{\"username\":\"admin\",\"password\":\"password\"}" ^
  -v

echo.
echo Login request sent. Check the response above for updated timestamp.
echo.
echo Press any key to stop the application...
pause

REM 停止应用
taskkill /f /im java.exe
